<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui"
    template="/WEB-INF/templates/prime.xhtml">
    
    <ui:define name="head">
        <style type="text/css">
            .label {
                width:20%;
                padding:2px;
            }   

            .value {
                width:80%;
                padding:2px;
            }   
    
            .grid {
                width:100%;
            }   
        </style>
    </ui:define>
    
  <ui:define name="content">
    
        <h:form prependId="false">
            <p:panel id="panel" header="New Panacea Instance">
                <p:growl showDetail="true"/>
                <h:panelGrid columns="2" columnClasses="label,value" styleClass="grid">
                    <h:outputLabel for="directory" value="Directory" styleClass="grid"/>
                    <h:inputText id="directory" value="#{panaceaController.instance.directory}"
                                 required="true"  requiredMessage="You need to specify an email address"
                                 validatorMessage="Directory is not valid">
                        <f:validateRegex pattern="[a-zA-Z0-9_]*" />
                     </h:inputText>
                    <p:commandButton value="Reset" type="reset"/>
                    <p:commandButton value="Save" action="#{panaceaController.save}"  async="false" ajax="false"/>
                </h:panelGrid>
            </p:panel>
        </h:form>
  </ui:define>
</ui:composition>
